<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EOS.IO: Database API</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN3.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a>  </div>
  <div class="headertitle">
<div class="title">Database API<div class="ingroups"><a class="el" href="group__contractdev.html">Smart Contract API Reference</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>APIs that store and retreive data on the blockchainEOS.IO organizes data according to the following broad structure:  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__database_c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__database_c.html">Database C API</a></td></tr>
<tr class="memdesc:group__database_c"><td class="mdescLeft">&#160;</td><td class="mdescRight">C APIs for interfacing with the database. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__database_cpp"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__database_cpp.html">Database C++ API</a></td></tr>
<tr class="memdesc:group__database_cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">C++ APIs for interfacing with the database. It is based on pimpl idiom. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<ul>
<li><b>scope</b> - an account where the data is stored<ul>
<li><b>code</b> - the account name which has write permission<ul>
<li><b>table</b> - a name for the table that is being stored<ul>
<li><b>record</b> - a row in the table</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>Every transaction specifies the set of valid scopes that may be read and/or written to. The code that is running determines what can be written to; therefore, write operations do not allow you to specify/configure the code.</p>
<dl class="section note"><dt>Note</dt><dd>Attempts to read and/or write outside the valid scope and/or code sections will cause your transaction to fail.</dd></dl>
<h1><a class="anchor" id="tabletypes"></a>
table Types</h1>
<p>There are several supported table types identified by the number and size of the index.</p>
<ol type="1">
<li><a class="el" href="group__dbi64.html">Single 64 bit Index table</a></li>
<li><a class="el" href="group__dbi128i128.html">Dual 128 bit Index table</a></li>
</ol>
<p>The database APIs assume that the first bytes of each record represent the primary and/or secondary keys followed by an arbitrary amount of data.</p>
<p>The <a class="el" href="group__database_cpp.html">Database C++ API</a> provides a simple interface for storing any fixed-size struct as a database row. </p>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
